home *** CD-ROM | disk | FTP | other *** search
- Program Prllx02;
-
- Uses Mode13h,Crt;
-
- Var Xcloud1,Width1:Integer;
- Xcloud2,Width2:Integer;
-
- Procedure ScrollUpClouds;
- Begin
- Move(Mem[Vp[1]:320],Mem[Vp[1]:0],63680);
-
- Line(0,199,319,199,0,Vp[1]);
-
- { Cloud number one }
- Line(Xcloud1,199,Xcloud1+Width1,199,3,Vp[1]);
- Xcloud1:=Xcloud1+Random(5)-2;
- If Xcloud1<0 Then Xcloud1:=0;
- If Xcloud1>319 Then Xcloud1:=319;
- Width1:=Width1+Random(5)-2;
- If Width1+Xcloud1>319 Then Width1:=319-Xcloud1;
- { Cloud number two }
- Line(Xcloud2,199,Xcloud2+Width2,199,3,Vp[1]);
- Xcloud2:=Xcloud2+Random(5)-2;
- If Xcloud2<0 Then Xcloud2:=0;
- If Xcloud2>319 Then Xcloud2:=319;
- Width2:=Width2+Random(5)-2;
- If Width2+Xcloud2>319 Then Width2:=319-Xcloud2;
- End;
-
- Procedure GlobalInit;
- Begin
- Randomize;
- Initgraph;
- InitVirt;
- End;
-
- Procedure GlobalClose;
- Begin
- Closegraph;
- Closevirt;
- End;
-
- Procedure CloudInit;
- Begin
- SetColor(0,0,0,0);
- SetColor(3,55,55,55);
- Width1:=50; Width2:=50;
- Xcloud1:=50; Xcloud2:=250;
- Cls(0,Vp[1]);
- End;
-
- Begin
- GlobalInit;
- CloudInit;
-
- Repeat
- ScrollUpClouds;
- CopyPage(Vp[1],Vga);
- Until Keypressed;
-
- GlobalClose;
- End.
-